<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<title>Testing the Image Gallery</title>

	<link rel="stylesheet" id="themeStyles" href="http://leoner.tianji.com/dijit/themes/tundra/tundra.css">
	<link rel="stylesheet" href="http://leoner.tianji.com/dojox/image/resources/image.css">

	<style type="text/css">
		@import "http://leoner.tianji.com/dijit/tests/css/dijitTests.css";
		#test{width:640px;margin:auto;}
		.left{
			float:left;
			right:10px;
			margin:10px;
			position:relative;
			width:85px;
			height:487px;
		}
		.left ul{
			margin:0;
			padding:0;
			list-style-type:none;
			position:absolute;
			right:0;
			bottom:0;
		}
		#gallery1{
			float:left;
			width:520px;
		}
		.clear{
			clear:both;
		}
		#areaEditable{
			float:left;
			width:520px;
			padding:10px
		}
		#areaEditable span{
			display:block;
			margin:auto;
			width:150px;
			text-align:center;
		}
	</style>
		<script src="http://leoner.tianji.com/dojo/dojo.js" djConfig="parseOnLoad:true, isDebug:true"></script>
		<script type="text/javascript">
			dojo.require("dojox.image.Gallery");
			dojo.require("dojo.data.ItemFileWriteStore");
			dojo.require("dojo.parser");
			dojo.require("dijit.InlineEditBox");
			dojo.require("dijit.form.Textarea");
			dojo.addOnLoad(function(){
				createWidet();
				dojo.subscribe("dojox_image_ThumbnailPicker_0/select",function(obj){
					//console.log("-->"+obj.index);
					//dojo._destroyElement(dojo.byId("dojox_image_SlideShow_0_imageDiv0"));
				})

			});
			function createWidet() {
				var imageItemStore = new dojo.data.ItemFileReadStore({url:"../../jsonp/json/10"})
				var itemRequest = {};
				var itemNameMap = {
				 imageThumbAttr: "mini",
				 imageLargeAttr: "large",
				 titleAttr:"desc",
				};
			setTimeout(function(){
				dijit.byId('gallery1').setDataStore(imageItemStore, itemRequest,itemNameMap);				
			},250);

			} // End of function_name
			function myHandler(id,newValue){
				console.debug("onChange for id = " + id + ", value: " + newValue);
			};
		</script>
	</head>
</head>
<body class="tundra">
	<h1 class="testTitle">dojox.image.Gallery</h1>
	<dt id="test" class="test">
		<div id="gallery1" dojoType="dojox.image.Gallery" imageWidth="500" imageHeight="385"></div>
		<div class="left">
			<ul>
				<li><a href="">转移图片</a></li>
				<li><a href="">删除图片</a></li>
				<li><a href="">设为封面</a></li>
				<li><a href="">分享图片</a></li>
			</ul>
		</div>
		<p id="areaEditable" dojoType="dijit.InlineEditBox" autoSave="true" editor="dijit.form.Textarea" onChange="myHandler(this.id,arguments[0])" title="pic desc"></p>
		<div class="clear">
			
		</div>
	</div>
<!--
	<h2>From ItemFileReadStore:</h2>
	<div id="gallery2" dojoType="dojox.image.Gallery"></div>
-->

</body>
</html>
